## package navigation

window.navigation = {}

## initialize

navigation.initialize = ->
  $('#main-nav li a').click ->
    $('#main-nav li').removeClass('active')
    $(this).parent().addClass('active')
    $('.content-pane').hide()
    target = this.innerHTML.toLowerCase()
    $("##{target}").fadeIn()
    #TODO: Better
    window[target].onSwitch() if window[target] and window[target].onSwitch
